package com.carmanagement

import grails.transaction.Transactional


@Transactional
class VehicleService {

	def getFullTanks(Vehicle v, def params) {
		return FullTank.findAllByVehicle(v, params)
	}

	def getFullTanksCount(Vehicle v) {
		return FullTank.countByVehicle(v)
	}

	def getMaintenances(Vehicle v, def params) {
		return Maintenance.findAllByVehicle(v, params)
	}

	def getMaintenancesCount(Vehicle v) {
		return Maintenance.countByVehicle(v)
	}

	def test(){
		return FullTank.findAll()
	}
}
